<#assign ctx=request.contextPath />
<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="renderer" content="webkit">
    <title>资料库</title>

    <!-- CSS文件 -->
    <link href="${ctx}/css/bootstrap.min.css" rel="stylesheet">
    <link href="${ctx}/css/font-awesome.css" rel="stylesheet">
    <link href="${ctx}/css/animate.css" rel="stylesheet">
    <link href="${ctx}/css/style.css" rel="stylesheet">
    <style type="text/css">
        #content-main {
            height: calc(100% - 40px);
            overflow: hidden;
        }
    </style>
</head>

<body class="fixed-sidebar full-height-layout gray-bg">
<div id="wrapper">
    <!--左侧导航开始-->
    <nav class="navbar-default navbar-static-side" role="navigation">
        <div class="nav-close"><i class="fa fa-times-circle"></i></div>
        <div class="sidebar-collapse">
            <ul class="nav" id="side-menu">
                <li class="nav-header">
                    <div class="dropdown profile-element">
                        <span><img alt="image" class="img-circle" src="${ctx}/imgs/profile_small.jpg"/></span>
                        <a data-toggle="dropdown" class="dropdown-toggle" href="#">
                                <span class="clear">
                               <span class="block m-t-xs"><strong class="font-bold">${user.nickName}</strong></span>
                                <span class="text-muted text-xs block">${user.roleStr}<b class="caret"></b></span>
                                </span>
                        </a>
                        <ul class="dropdown-menu animated fadeInRight m-t-xs">
                            <li><a class="J_menuItem" href="${ctx}/chagePasswordView">修改密码</a></li>
                            <li class="divider"></li>
                            <li><a class="J_menuItem" onclick="logout();">安全退出</a></li>
                        </ul>
                    </div>
                    <div class="logo-element"></div>
                </li>

                <li>
                    <a href="#">
                        <i class="fa fa-home"></i>
                        <span class="nav-label">传送门管理</span>
                        <span class="fa arrow"></span>
                        </span>
                    </a>
                    <ul class="nav nav-second-level">
                        <li>
                            <a class="J_menuItem" data-index="0" href="${ctx}/noteList">列表</a>
                        </li>
                    </ul>
                    <ul class="nav nav-second-level">
                        <li>
                            <a class="J_menuItem" href="${ctx}/addNoteView">添加</a>
                        </li>
                    </ul>
                    <#if role&lt;3>
                    <ul class="nav nav-second-level" >
                        <li>
                            <a class="J_menuItem" href="${ctx}/authList">审核</a>
                        </li>
                    </ul>
                    </#if>
                </li>
                <li>
                    <a href="#">
                        <i class="fa fa-home"></i>
                        <span class="nav-label">随笔管理</span>
                        <span class="fa arrow"></span>
                        </span>
                    </a>
                    <ul class="nav nav-second-level">
                        <li>
                            <a class="J_menuItem" href="${ctx}/essayList">列表</a>
                        </li>
                    </ul>
                    <ul class="nav nav-second-level">
                        <li>
                            <a class="J_menuItem" href="${ctx}/addEssayView">添加</a>
                        </li>
                    </ul>
                </li>
                <#--<li>
                    <a href="#">
                        <i class="fa fa-home"></i>
                        <span class="nav-label">项目管理</span>
                        <span class="fa arrow"></span>
                        </span>
                    </a>
                    <ul class="nav nav-second-level">
                        <li>
                            <a class="J_menuItem" href="${ctx}/projectList">列表</a>
                        </li>
                    </ul>
                    <ul class="nav nav-second-level">
                        <li>
                            <a class="J_menuItem" href="${ctx}/addProjectView">添加</a>
                        </li>
                    </ul>
                </li>-->
                <#if role!=3>
                <li>
                    <a href="#">
                        <i class="fa fa-home"></i>
                        <span class="nav-label">用户管理</span>
                        <span class="fa arrow"></span>
                        </span>
                    </a>
                    <ul class="nav nav-second-level">
                        <li>
                            <a class="J_menuItem" href="${ctx}/userList">列表</a>
                        </li>
                    </ul>
                </li>
                </#if>
                <li>
                    <a href="#">
                        <i class="fa fa-home"></i>
                        <span class="nav-label">自定义标签</span>
                        <span class="fa arrow"></span>
                        </span>
                    </a>
                    <ul class="nav nav-second-level">
                        <li>
                            <a class="J_menuItem" href="${ctx}/customTagList">列表</a>
                        </li>
                    </ul>
                    <ul class="nav nav-second-level">
                        <li>
                            <a class="J_menuItem" href="${ctx}/addCustomTagView">添加</a>
                        </li>
                    </ul>
                </li>
            </ul>
        </div>
    </nav>
    <!--左侧导航结束-->
    <!--右侧部分开始-->
    <div id="page-wrapper" class="gray-bg dashbard-1">
        <div class="row border-bottom" style="display:none;">
            <nav class="navbar navbar-static-top" role="navigation" style="margin-bottom: 0">
                <!---->
                <div class="navbar-header">
                    <a class="navbar-minimalize minimalize-styl-2 btn btn-primary " href="#"><i class="fa fa-bars"></i>
                    </a>
                    <form role="search" class="navbar-form-custom" method="post" action="search_results.html">
                        <div class="form-group">
                            <!--<input type="text" placeholder="请输入您需要查找的内容 …" class="form-control" name="top-search" id="top-search">-->
                        </div>
                    </form>
                </div>
                <ul class="nav navbar-top-links navbar-right">

                </ul>
                <!---->
            </nav>
        </div>

        <div class="row J_mainContent" id="content-main">
            <iframe class="J_iframe" name="iframe0" width="100%" height="100%" src="${ctx}/noteList" frameborder="0"
                    data-id="index_v1.html" seamless></iframe>
            <!--默认主页需在对应的页面显示iframe元素上添加name="iframe0"和data-id="默认主页的url"-->
        </div>
        <div class="footer">
            <div class="pull-right">©数众科技 <a href="" target="_blank"></a>
            </div>
        </div>
    </div>
    <!--右侧部分结束-->
</div>

<!-- 全局js -->
<script src="${ctx}/js/jquery.min.js"></script>
<script src="${ctx}/js/bootstrap.min.js"></script>
<script src="${ctx}/js/plugins/metisMenu/jquery.metisMenu.js"></script>
<script src="${ctx}/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
<script src="${ctx}/js/plugins/layer/layer.min.js"></script>

<!-- 自定义js -->
<script src="${ctx}/js/hplus.js?v=4.1.0"></script>
<script type="text/javascript" src="${ctx}/js/contabs.js"></script>

<!-- 第三方插件 -->
<script src="${ctx}/js/plugins/pace/pace.min.js"></script>
<script>
    function logout() {
        $.ajax({
            type: "post",
            url: "${ctx}/logout",
            data: {},
            success: function (data) {
                window.parent.location.href = '${ctx}/login';
            }
        });
    }
</script>
</body>
</html>
